package liuwanghui.mapper;

import liuwanghui.dto.request.*;
import liuwanghui.pojo.Order;
import liuwanghui.pojo.OrderStatusLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface OrderMapper {
    List<Order> findOrdersBySearch(OrderQueryDTO params);
    Order findOrderById(@Param("id") Long id);
    List<OrderStatusLog> findOrderStatusHistory(@Param("orderId") Long orderId);
    void updateOrderStatus(@Param("id") Long id, @Param("status") String status);
    void insertOrderStatusLog(OrderStatusLogDTO log);
    void updateOrderCancelInfo(@Param("id") Long id, @Param("dto") OrderCancelDTO dto);
    void updateOrderShipInfo(@Param("id") Long id, @Param("dto") OrderShipDTO dto);
    List<Order> findRecentOrders(@Param("role") String role, 
                                @Param("days") Integer days, 
                                @Param("limit") Integer limit);
} 